import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/page/views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
   {
    path: '/',
    name: '/',
    redirect: "/page/page3"
  },
  {
    path: '/login',
    name: 'login',
    component: () =>
      import('@/views/login/login'),
  },
  {
    path: '/',
    name: 'page',
    redirect: "/page/page1",
    component: () => import('../views/page/index'),
    children: [
      {
        path: '/page',
        name: 'page',
        redirect: "/page/page1",
        component: () => import('../views/page'),
        meta: {
          fullPath: "/page",
          title: "第二页",
        },
        children: [
          {
            path: "page1",
            name: "page1",
            menuId: 221,
            component: () => import("../views/page/views/page1"),
            meta: {
              fullPath: "/page/page1",
              title: "集团高管端",
            },
          },
            {
            path: "page2",
            name: "page2",
            menuId: 221,
            component: () => import("../views/page/views/page2"),
            meta: {
              fullPath: "/page/page2",
              title: "xxx",
            },
          },
           {
            path: "page3",
            name: "page3",
            menuId: 221,
            component: () => import("../views/page/views/page3"),
            meta: {
              fullPath: "/page/page3",
              title: "xxx",
            },
          },
          {
            path: "page4",
            name: "page4",
            menuId: 221,
            component: () => import("../views/page/views/page4"),
            meta: {
              fullPath: "/page/page4",
              title: "xxx",
            },
          },
           {
            path: "page5",
            name: "page5",
            menuId: 221,
            component: () => import("../views/page/views/page5"),
            meta: {
              fullPath: "/page/page5",
              title: "xxx",
            },
          },
           {
            path: "page6",
            name: "page6",
            menuId: 221,
            component: () => import("../views/page/views/page6"),
            meta: {
              fullPath: "/page/page6",
              title: "xxx",
            },
          },
           {
            path: "page7",
            name: "page7",
            menuId: 221,
            component: () => import("../views/page/views/page7"),
            meta: {
              fullPath: "/page/page7",
              title: "xxx",
            },
          },
          {
            path: "HomeView",
            name: "HomeView",
            menuId: 221,
            component: () => import("../views/page/views/HomeView"),
            meta: {
              fullPath: "/page/HomeView",
              title: "集团高管端",
            },
          },
          {
            path: "AboutView",
            name: "AboutView",
            menuId: 221,
            component: () => import("../views/page/views/AboutView"),
            meta: {
              fullPath: "/page/AboutView",
              title: "集团高管端",
            },
          },
        ],
      },
    ],
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
